import React from 'react';
import AppScroll from '../../../../components/app-scroll'
export default function Menu({data,selected,onChange}) {
    return (
       <AppScroll className="menu">
            {
                data.map((item,index)=>(
                    <div className={'menu-item' + (selected===item.get('id')? ' active' :'')} key={index} onClick={()=>onChange(item.get('id'))} >
                        {item.get('text')}
                    </div>
                ))
            }
       </AppScroll>
    )
}
